from django.contrib import admin
from .models import *

@admin.register(WrasStyle)
class WrasStyleAdmin(admin.ModelAdmin):
    list_display = ['selector', 'enabled', 'order', 'raw_css', 'data_json', 'css']
    list_editable = ['selector', 'enabled', 'order']
    list_filter = ['enabled']
    search_fields = ['selector', 'raw_css',  'data_json']


@admin.register(WrasModule)
class WrasModuleAdmin(admin.ModelAdmin):
    list_display = ['name', 'zh_name', 'enabled', 'public', 'has_sub_url', 'js', 'css', 'icon_class', 'order']
    list_editable = ['zh_name', 'enabled', 'public', 'js', 'css', 'icon_class', 'order']
    list_filter = ['enabled', 'public']

#
# @admin.register(User_Module)
# class User_ModuleAdmin(admin.ModelAdmin):
#     list_display = ['user', 'module', 'can_see', 'can_use']
#     list_filter = ['module', 'can_see', 'can_use']
#     search_fields = ['user']
#     list_editable = ['can_see', 'can_use']
#
#
# @admin.register(Company_Module)
# class Company_ModuleAdmin(admin.ModelAdmin):
#     list_display = ['company', 'module', 'can_see', 'can_use']
#     list_filter = ['module', 'can_see', 'can_use']
#     search_fields = ['company']
#     list_editable = ['can_see', 'can_use']

